home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Contributed / SpriteWorld / SpriteWorld Examples / SimpleBreakOut / SimpleBreakOut.make < prev    next >
Encoding:
Text File  |  2000-10-06  |  7.0 KB  |  241 lines  |  [TEXT/MPS ]

  1. #-----------------------------------------------------------------------
  2. #    Makefile for MPW (Macintosh Programmers Workshop by Apple)
  3. #
  4. #   Project:    SimpleBreakOut
  5. #   File:       SimpleBreakOut.make
  6. #
  7. #    Targets:    68K.Final, PPC.Final, FAT.Final (default)
  8. #                68K.Debug, PPC.Debug, All
  9. #                 Clean (remove objects), Clean-All (remove binaries)
  10. #                
  11. #    Written by Anders F Björklund <afb@algonet.se>
  12. #   and Michael Matuszek <mmatuszek@mbayweb.com>
  13. #
  14. #    Generated from Makefile.template by makemake.pl
  15. #-----------------------------------------------------------------------
  16.  
  17. Makefile          = "SimpleBreakOut.make"        # high-level make (this file)
  18. MakeOutput          = "SimpleBreakOut.makelow"    # low-level make (built by this file)
  19.  
  20. "SimpleBreakOut"         ƒ    FAT.Final            # Default High-Level Target
  21. All                ƒ    Debug Final
  22. Debug             ƒ    68K.Debug PPC.Debug
  23. Final             ƒ    68K.Final PPC.Final
  24. Clean            ƒ    Clean.Debug Clean.Final
  25. Clean-All        ƒ    Clean-All.Debug Clean-All.Final
  26.  
  27. #----------------------------------------------------
  28.  
  29. Tgt                =    #
  30. Opt                =    #
  31. Sym                =    #
  32. Dbg                =    #
  33. Mbg                =    #
  34.  
  35. Common =         -f {Makefile}
  36.                 
  37. Debug =         -d    Tgt=Debug ∂
  38.                 -d    Opt=off ∂
  39.                 -d    Sym=on ∂
  40.                 -d    Dbg=Debug
  41.             
  42. Final =         -d    Tgt=Final ∂
  43.                 -d    Opt=speed ∂
  44.                 -d    Sym=off ∂
  45.                 -d    Dbg=
  46.  
  47. Debug68K =        {Common} {Debug} -d Mbg="-mbg on"
  48. DebugPPC =        {Common} {Debug} -d Mbg="-tb on"
  49. Final68K =        {Common} {Final} -d Mbg="-mbg off"
  50. FinalPPC =        {Common} {Final} -d Mbg=""
  51. FinalFAT =        {Common} {Final}
  52.  
  53. #----------------------------------------------------
  54. # The high-level targets
  55. #----------------------------------------------------
  56.  
  57. 68K.Debug         ƒ    $OutOfDate
  58.     Make -d Binary=68K {Debug68K} 68K >{MakeOutput}
  59.     Execute {MakeOutput}
  60.     Delete {MakeOutput}
  61.  
  62. PPC.Debug         ƒ    $OutOfDate
  63.     Make -d Binary=PPC {DebugPPC} PPC >{MakeOutput}
  64.     Execute {MakeOutput}
  65.     Delete {MakeOutput}
  66.  
  67. 68K.Final         ƒ    $OutOfDate
  68.     Make -d Binary=68K {Final68K} 68K >{MakeOutput}
  69.     Execute {MakeOutput}
  70.     Delete {MakeOutput}
  71.     
  72. PPC.Final         ƒ    $OutOfDate
  73.     Make -d Binary=PPC {FinalPPC} PPC >{MakeOutput}
  74.     Execute {MakeOutput}
  75.     Delete {MakeOutput}
  76.  
  77. FAT.Final         ƒ    $OutOfDate
  78.     Make -d Binary=FAT {FinalFAT} FAT >{MakeOutput}
  79.     Execute {MakeOutput}
  80.     Delete {MakeOutput}
  81.  
  82. Clean.Debug     ƒ    $OutOfDate
  83.     Make {Common} {Debug} Remove >{MakeOutput}
  84.     Execute {MakeOutput}
  85.     Delete {MakeOutput}
  86.  
  87. Clean.Final     ƒ    $OutOfDate
  88.     Make {Common} {Final} Remove >{MakeOutput}
  89.     Execute {MakeOutput}
  90.     Delete {MakeOutput}
  91.  
  92. Clean-All.Debug ƒ    $OutOfDate
  93.     Make {Common} {Debug} Remove-All >{MakeOutput}
  94.     Execute {MakeOutput}
  95.     Delete {MakeOutput}
  96.  
  97. Clean-All.Final ƒ    $OutOfDate
  98.     Make {Common} {Final} Remove-All >{MakeOutput}
  99.     Execute {MakeOutput}
  100.     Delete {MakeOutput}
  101.  
  102. #-----------------------------------------------------------------------
  103. # Project Variables
  104. #-----------------------------------------------------------------------
  105.  
  106. Sources         =    ":"
  107. Headers          =    ":"
  108. Objects            =    ":{Dbg}Objects:"
  109. TargetFolder    =    ":"
  110.  
  111. SWHeaders         =    "{SpriteWorld}Headers:,{SpriteWorld}Utils:,{SpriteWorld}Utils:Brian's Extensions:"
  112. BPHeaders        =     "{SpriteWorld}BlitPixie:Headers:"
  113.  
  114. AppName              =    SimpleBreakOut
  115. AppName68K        =    "{AppName} 68K {Tgt}"
  116. AppNamePPC        =    "{AppName} PPC {Tgt}"
  117. AppNameFat        =    "{AppName} FAT"
  118.  
  119. 68K                 ƒ    {AppName68K}
  120. PPC                 ƒ    {AppNamePPC}
  121. FAT                ƒ    {AppNameFat}
  122.  
  123. #-----------------------------------------------------------------------
  124. # Compiler options
  125. #-----------------------------------------------------------------------
  126.  
  127. CC68K             =    {C}        # normally SC
  128. CCPPC            =    {PPCC}    # normally MrC
  129. LINK68K         =    Link    # ILink gave error: segment without name ?
  130. LINKPPC         =    PPCLink
  131.  
  132. Options            =
  133. Warnings        =    -proto strict -typecheck strict  
  134. IncludesFolders    =    -i {Headers} -i {SWHeaders} -i {BPHeaders}
  135.  
  136. Creator            =    '????'
  137. Type            =    'APPL'
  138.  
  139. CCOptions       =    {IncludesFolders} {Options} {Warnings} -opt {Opt} 
  140. CCOptions68K    =     {CCOptions} {Mbg} -model far
  141. CCOptionsPPC    =     {CCOptions} {Mbg}
  142.  
  143. LinkOptions     =     -sym {Sym} -t {Type} -c {Creator}
  144. LinkOptions68K   =     {LinkOptions} -model far
  145. LinkOptionsPPC    =     {LinkOptions}
  146.  
  147. #-----------------------------------------------------------------------
  148. # These are the SimpleBreakOut project objects.
  149. #-----------------------------------------------------------------------
  150.  
  151. AppObjects68K =    ∂
  152.                 {Objects}'SimpleBreakOut.c.o' ∂
  153.                 #
  154. AppObjectsPPC = ∂
  155.                 {Objects}'SimpleBreakOut.c.x' ∂
  156.                 #
  157. AppResources = ∂
  158.                 {Objects}'SimpleBreakOut.rsrc.r' ∂
  159.                 #
  160.  
  161. #-----------------------------------------------------------------------
  162. # These are the Mac OS system libraries.
  163. #-----------------------------------------------------------------------
  164.  
  165. Libs68K = ∂
  166.         "{Libraries}MacRuntime.o" ∂
  167.         "{Libraries}Interface.o" ∂
  168.         "{CLibraries}StdCLib.o" ∂
  169.         "{Libraries}MathLib.o" ∂
  170.         "{Libraries}IntEnv.o" ∂
  171.         "{Libraries}ToolLibs.o"
  172.           
  173. LibsPPC = ∂
  174.         "{SharedLibraries}InterfaceLib" ∂
  175.         "{SharedLibraries}StdCLib" ∂
  176.         "{SharedLibraries}MathLib" ∂
  177.         "{PPCLibraries}StdCRuntime.o" ∂
  178.         "{PPCLibraries}PPCCRuntime.o" ∂
  179.         "{PPCLibraries}PPCToolLibs.o"
  180.     
  181. #-----------------------------------------------------------------------
  182. # These are the SpriteWorld libraries.
  183. #-----------------------------------------------------------------------
  184.  
  185. SWLibs68K = ∂
  186.         "{SpriteWorld}MPW:QDGlobals.o" ∂
  187.         "{SpriteWorld}Libraries:SpriteWorld{Dbg}Lib.o" ∂
  188.         "{SpriteWorld}Libraries:SpriteWorld{Dbg}Utils.o" 
  189.         
  190. SWLibsPPC = ∂
  191.         "{SpriteWorld}MPW:QDGlobals.x" ∂
  192.         "{SpriteWorld}Libraries:SpriteWorld{Dbg}Lib.x" ∂
  193.         "{SpriteWorld}Libraries:SpriteWorld{Dbg}Utils.x" 
  194.  
  195. SWResources = ∂
  196.         "{SpriteWorld}MPW:ApplicationSize.r" 
  197.  
  198. #-----------------------------------------------------------------------
  199. # These are modified default build rules.  
  200. #-----------------------------------------------------------------------
  201.  
  202. {Objects}        ƒ    {Sources}
  203.  
  204. .c.o            ƒ    .c
  205.     Echo "# Compiling {Default}.c using {CC68K}"
  206.     {CC68K} {CCOptions68K} {DepDir}{Default}.c -o {TargDir}{Default}.c.o 
  207.  
  208. .c.x            ƒ    .c
  209.     Echo "# Compiling {Default}.c using {CCPPC}"
  210.     {CCPPC} {CCOptionsPPC} {DepDir}{Default}.c -o {TargDir}{Default}.c.x 
  211.  
  212. .rsrc.r            ƒ    .rsrc
  213.     Echo "# Compiling {Default}.rsrc using DeRez"
  214.     Echo "#include ∂"Types.r∂"" >{TargDir}{Default}.rsrc.r
  215.     DeRez -i {RIncludes} {DepDir}{Default}.rsrc Types.r ∂
  216.                                              >>{TargDir}{Default}.rsrc.r
  217.  
  218. #-----------------------------------------------------------------------
  219. # The low-level output targets.  
  220. #-----------------------------------------------------------------------
  221.  
  222. Objects68K        =    {AppObjects68K} {Libs68K} {SWLibs68K}
  223. ObjectsPPC        =    {AppObjectsPPC} {LibsPPC} {SWLibsPPC} 
  224. Resources        =    {AppResources} {SWResources}
  225.  
  226. {AppName68K}    ƒƒ    {Resources} {Objects68K}
  227.     Echo "# Making {AppName68K}"
  228.     {LINK68K} {LinkOptions68K} -o {TargetFolder}{AppName68K} {Objects68K}
  229.     Rez -a -i {RIncludes} -o {TargetFolder}{AppName68K} {Resources}
  230.  
  231. {AppNamePPC}    ƒƒ    {Resources} {ObjectsPPC}
  232.     Echo "# Making {AppNamePPC}"
  233.     {LINKPPC} {LinkOptionsPPC} -o {TargetFolder}{AppNamePPC} {ObjectsPPC}
  234.     Rez -a -i {RIncludes} -o {TargetFolder}{AppNamePPC} {Resources}
  235.     
  236. {AppNameFat}    ƒƒ    {AppNamePPC} {AppName68K}    
  237.     Echo "# Making {AppNameFat}"
  238.     Duplicate -y  {TargetFolder}{AppName68K} {TargetFolder}{AppNameFat}
  239.     MergeFragment {TargetFolder}{AppNamePPC} {TargetFolder}{AppNameFat}
  240.  
  241.